﻿#ifndef FILETRANS_H
#define FILETRANS_H
#pragma once
#include <QObject>
#include <QTcpServer>
#include <QList>
#include "filethread.h"


class FileTrans_Socket;
class FileTrans:public QTcpServer
{
    Q_OBJECT
public:
    FileTrans();
    ~FileTrans();
    static FileTrans& getInstance();
    void incomingConnection(qintptr handle);//有客户端连接就会触发此信号
    void TransFileData(char* recvname,QString filepath,QString filename, uint filesize);
    QList<FileThread*> m_filethreadlist;//管理线程
private:
    QList<FileTrans_Socket*> m_FileTrans_list;
};

#endif // FILETRANS_H
